﻿#if No_No_no_Error
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class HomeManager : MonoBehaviour
{
	public GameObject levelPanel;

	public GameObject playBtn, moreGameBtn;
	// Use this for initialization
	void Start ()
	{
		//PlayerPrefs.DeleteAll ();
	}
	
	// Update is called once per frame
	void Update ()
	{
		if (Input.GetKeyDown (KeyCode.Escape))
			Application.Quit ();
	}

	public void CloseLevelSelector ()
	{

		levelPanel.SetActive (false);
		AudioManager.Instance.PlayClickSound ();
	}


	public void OpenLevelSelector ()
	{
		//playBtn.SetActive (false);
		//moreGameBtn.SetActive (false);
		OpenSingleMode();
		AudioManager.Instance.PlayClickSound ();
	}

	public void ShowMoreGame ()
	{
		AdsControl.Instance.RateMyGame ();
	}

	public void OpenSingleMode ()
	{
		PlayerPrefs.SetInt ("Mode", 0);
		levelPanel.SetActive (true);
		AudioManager.Instance.PlayClickSound ();
	}

	public void OpenMultiMode ()
	{
		PlayerPrefs.SetInt ("Mode", 1);
		levelPanel.SetActive (true);
		AudioManager.Instance.PlayClickSound ();
	}
}
#endif